package hjw.com.service;

import hjw.com.dao.CommentMapper;
import hjw.com.entity.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>Project:Academic - CommentMapper
 *
 * @author IvanWei玮 -- maste
 * @version 1.0
 * @DataTime 2025/2/13 16:27
 * @since 1.8
 */
@Service
public class CommentServiceImpl implements CommentService{

    private CommentMapper commentMapper;

    @Autowired
    public CommentServiceImpl(CommentMapper commentMapper){
        this.commentMapper = commentMapper;
    }
    @Override
    public int addComment(Map<String, Object> map){
        return commentMapper.addComment(map);
    }

    @Override
    public int deleteComment(int id){
        return commentMapper.deleteComment(id);
    }

    @Override
    public List<Comment> getComment(Map<String, Object> map){
        return commentMapper.getComment(map);
    }
}
